<%@page import="com.dfhc.quota.IQuotaConstants"%>

<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="/dfhc" prefix="dfhc" %>
<html lang="en">
	<head>
	   <!-- 全局js 和css包 -->
	  	 <%@ include file="/jsp/include/web/new/global.jsp" %>
	   <!-- 全局js 和css包 -->

		<title></title>

	</head>
	<body>
	<dfhc:template templateUrl="/pubController/getLayoutTemp/?jspUrl=/temp/bodyTemp" >
		<dfhc:region name="content">

		<form action="" method="post"  name="form"  id="form">
	
		<dfhc:template templateUrl="/pubController/getLayoutTemp/?jspUrl=/temp/searchTemp" >
			<dfhc:region name="content">
				<dfhc:title  type="add"  title='<%=IQuotaConstants.TABLE_COLUMN_DISPLAY.get("accountHolderName")%>'> <dfhc:input  name="accountHolderName"  value="${queryCondition.accountHolderName }" /> </dfhc:title>
			</dfhc:region>
			<dfhc:region name="search">
				<dfhc:button type="search"   onclick="_search('/quota');"/>
			</dfhc:region>
			<dfhc:region name="reset">
				<dfhc:button type="reset"   onclick="_reset('#form');"/>
			</dfhc:region>
		</dfhc:template>
		
		
		<dfhc:template templateUrl="/pubController/getLayoutTemp/?jspUrl=/temp/tableTemp" >
		<dfhc:region name="tableButton">
			<dfhc:template templateUrl="/pubController/getLayoutTemp/?jspUrl=/temp/tableButtonTemp" >
				<dfhc:region name="button" >
					<dfhc:button type="add"    onclick="_doOpenPage('/quota/doAddPage')"/>
				</dfhc:region>
			</dfhc:template>
			<dfhc:template templateUrl="/pubController/getLayoutTemp/?jspUrl=/temp/tableButtonTemp" >
				<dfhc:region name="button">
					<dfhc:button type="update"   onclick="_doUpdatePage('/quota/doAddPage','#form');"/>
				</dfhc:region>
			</dfhc:template>
			<dfhc:template templateUrl="/pubController/getLayoutTemp/?jspUrl=/temp/tableButtonTemp" >
				<dfhc:region name="button">
					<dfhc:button type="del"    onclick="_delete('/quota/logicDelete','#form','/quota');"/>
				</dfhc:region>
			</dfhc:template>
		</dfhc:region>
		
		<dfhc:region name="tableName">
			课程
		</dfhc:region>	
		
		<dfhc:region name="table">
		    <dfhc:table>
		     <thead>
				    <dfhc:tr>
				    	<dfhc:th  ><dfhc:checkbox  /></dfhc:th>
				    	<dfhc:th  value="序号" />
				    	<dfhc:th  value='<%=IQuotaConstants.TABLE_COLUMN_DISPLAY.get("accountHolderName")%>'  RM_ORDER_STR="ACCOUNT_HOLDER_NAME"  onclick="_orderStr(this);" />
				    	<dfhc:th  value='<%=IQuotaConstants.TABLE_COLUMN_DISPLAY.get("creditQuota")%>' RM_ORDER_STR="CREDIT_QUOTA"  onclick="_orderStr(this);" />
				    	<dfhc:th  value='<%=IQuotaConstants.TABLE_COLUMN_DISPLAY.get("rechargeQuota")%>' RM_ORDER_STR="RECHARGE_QUOTA"  onclick="_orderStr(this);" />
				    </dfhc:tr>
		    </thead>
		    <tbody>
			    <c:forEach   items="${beans}"  var="bean"   varStatus="status">
				    <dfhc:tr  ondblclick="_doOpenPage('/quota/detail/${bean.id}')">
				    	<dfhc:td ><dfhc:checkbox    value="${bean.id}"  /></dfhc:td>
				    	<dfhc:td   value="${status.index+1}"/>
				    	<dfhc:td   value="${bean.accountHolderName}"/>
				    	<dfhc:td   value="${bean.creditQuota}"/>
				    	<dfhc:td   value="${bean.rechargeQuota}"/>
				    </dfhc:tr>
				</c:forEach>
			</tbody>
		    </dfhc:table>
		</dfhc:region>
		
		<dfhc:region name="page">
				<dfhc:input type="hidden"  name="RM_ORDER_STR"  value="${RM_ORDER_STR}"/>
				<jsp:include page="/jsp/include/page.jsp"></jsp:include>							
		</dfhc:region>
		
		
		</dfhc:template>
</form>
</dfhc:region>
</dfhc:template>


<script type="text/javascript">

$(function(){    
	_orderClu();//默认显示排序
});


layui.use(['laydate','element','laypage','layer','table'], function(){
    $         = layui.jquery;  // jquery
    laydate   = layui.laydate; // 日期插件
    lement    = layui.element; // 面包导航
    laypage   = layui.laypage; // 分页
    layer     = layui.layer;   // 弹出层

    var startIns = laydate.render({
        elem: '#start_time'
        ,done: function(value, date, endDate){
            var min = $.extend({},date)
                , max = $.extend({},date);
            min.month = min.month-1;//不清楚为什么在设置月份的时候必须要-1，不清楚作者是否有意为之
            max.month = max.month-1;
            // max.date = max.date+4;

            endIns.config.min = min;
            // endIns.config.max = max;
            // console.info(endIns);
            $(endIns.config.elem).focus().val(value);
        }
    });
    var endIns = laydate.render({
        elem: '#end_time'
        ,done: function(value, date, endDate){
        }
    });
});
</script>
	</body>
</html>

